const tailwindcss = require('tailwindcss')
const autoprefixer = require('autoprefixer')
const postcssrename = require('postcss-class-rename')
const { uniPostcssPlugin } = require('@dcloudio/uni-cli-shared')
module.exports = function (options = {}) {
  let plugins = [
    uniPostcssPlugin,
    autoprefixer,
    tailwindcss(),
    postcssrename({
      "\\\\.": "_",
      "\\\*\,": ":root,page,",
    }), ...(options.plugins || [])]

  let config = Object.assign(options, { plugins })
  return config
}
